3.3.41 \(\int \frac {\cot ^3(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\) [241]

Optimal. Leaf size=181 \[ -\frac {\cot ^2(e+f x)}{2 a^3 f}-\frac {\log (\cos (e+f x))}{(a-b)^3 f}-\frac {(a+3 b) \log (\tan (e+f x))}{a^4 f}-\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^4 (a-b)^3 f}+\frac {b^2}{4 a^2 (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}+\frac {(3 a-2 b) b^2}{2 a^3 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )} \]

[Out]

-1/2*cot(f*x+e)^2/a^3/f-ln(cos(f*x+e))/(a-b)^3/f-(a+3*b)*ln(tan(f*x+e))/a^4/f-1/2*b^2*(6*a^2-8*a*b+3*b^2)*ln(a
+b*tan(f*x+e)^2)/a^4/(a-b)^3/f+1/4*b^2/a^2/(a-b)/f/(a+b*tan(f*x+e)^2)^2+1/2*(3*a-2*b)*b^2/a^3/(a-b)^2/f/(a+b*t
an(f*x+e)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.15, antiderivative size = 181, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 457, 90} \begin {gather*} -\frac {(a+3 b) \log (\tan (e+f x))}{a^4 f}+\frac {b^2 (3 a-2 b)}{2 a^3 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac {\cot ^2(e+f x)}{2 a^3 f}+\frac {b^2}{4 a^2 f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}-\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^4 f (a-b)^3}-\frac {\log (\cos (e+f x))}{f (a-b)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^3/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

-1/2*Cot[e + f*x]^2/(a^3*f) - Log[Cos[e + f*x]]/((a - b)^3*f) - ((a + 3*b)*Log[Tan[e + f*x]])/(a^4*f) - (b^2*(
6*a^2 - 8*a*b + 3*b^2)*Log[a + b*Tan[e + f*x]^2])/(2*a^4*(a - b)^3*f) + b^2/(4*a^2*(a - b)*f*(a + b*Tan[e + f*
x]^2)^2) + ((3*a - 2*b)*b^2)/(2*a^3*(a - b)^2*f*(a + b*Tan[e + f*x]^2))

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^3 \left (1+x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x^2 (1+x) (a+b x)^3} \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{a^3 x^2}+\frac {-a-3 b}{a^4 x}+\frac {1}{(a-b)^3 (1+x)}-\frac {b^3}{a^2 (a-b) (a+b x)^3}-\frac {(3 a-2 b) b^3}{a^3 (a-b)^2 (a+b x)^2}-\frac {b^3 \left (6 a^2-8 a b+3 b^2\right )}{a^4 (a-b)^3 (a+b x)}\right ) \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=-\frac {\cot ^2(e+f x)}{2 a^3 f}-\frac {\log (\cos (e+f x))}{(a-b)^3 f}-\frac {(a+3 b) \log (\tan (e+f x))}{a^4 f}-\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^4 (a-b)^3 f}+\frac {b^2}{4 a^2 (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}+\frac {(3 a-2 b) b^2}{2 a^3 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.29, size = 144, normalized size = 0.80 \begin {gather*} -\frac {\frac {\cot ^2(e+f x)}{a^3}-\frac {b^4}{2 a^4 (a-b) \left (b+a \cot ^2(e+f x)\right )^2}+\frac {(4 a-3 b) b^3}{a^4 (a-b)^2 \left (b+a \cot ^2(e+f x)\right )}+\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (b+a \cot ^2(e+f x)\right )}{a^4 (a-b)^3}+\frac {2 \log (\sin (e+f x))}{(a-b)^3}}{2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^3/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

-1/2*(Cot[e + f*x]^2/a^3 - b^4/(2*a^4*(a - b)*(b + a*Cot[e + f*x]^2)^2) + ((4*a - 3*b)*b^3)/(a^4*(a - b)^2*(b
+ a*Cot[e + f*x]^2)) + (b^2*(6*a^2 - 8*a*b + 3*b^2)*Log[b + a*Cot[e + f*x]^2])/(a^4*(a - b)^3) + (2*Log[Sin[e
+ f*x]])/(a - b)^3)/f

________________________________________________________________________________________

Maple [A]
time = 0.42, size = 217, normalized size = 1.20 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(-1/4/a^3/(cos(f*x+e)+1)+1/2*(-a-3*b)/a^4*ln(cos(f*x+e)+1)+1/4/a^3/(cos(f*x+e)-1)+1/2*(-a-3*b)/a^4*ln(cos(
f*x+e)-1)-1/2*b^2/a^4*(2*(2*a-b)*a*b/(a-b)^3/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)+(6*a^2-8*a*b+3*b^2)/(a-b)^3*ln(
a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)-1/2*a^2/(a-b)^3*b^2/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^2))

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 352, normalized size = 1.94 \begin {gather*} -\frac {\frac {2 \, {\left (6 \, a^{2} b^{2} - 8 \, a b^{3} + 3 \, b^{4}\right )} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}} + \frac {2 \, a^{5} - 6 \, a^{4} b + 6 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + 2 \, {\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 14 \, a^{2} b^{3} + 11 \, a b^{4} - 3 \, b^{5}\right )} \sin \left (f x + e\right )^{4} - {\left (4 \, a^{5} - 16 \, a^{4} b + 24 \, a^{3} b^{2} - 24 \, a^{2} b^{3} + 9 \, a b^{4}\right )} \sin \left (f x + e\right )^{2}}{{\left (a^{8} - 5 \, a^{7} b + 10 \, a^{6} b^{2} - 10 \, a^{5} b^{3} + 5 \, a^{4} b^{4} - a^{3} b^{5}\right )} \sin \left (f x + e\right )^{6} - 2 \, {\left (a^{8} - 4 \, a^{7} b + 6 \, a^{6} b^{2} - 4 \, a^{5} b^{3} + a^{4} b^{4}\right )} \sin \left (f x + e\right )^{4} + {\left (a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}\right )} \sin \left (f x + e\right )^{2}} + \frac {2 \, {\left (a + 3 \, b\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{4}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

-1/4*(2*(6*a^2*b^2 - 8*a*b^3 + 3*b^4)*log(-(a - b)*sin(f*x + e)^2 + a)/(a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3) +
 (2*a^5 - 6*a^4*b + 6*a^3*b^2 - 2*a^2*b^3 + 2*(a^5 - 5*a^4*b + 10*a^3*b^2 - 14*a^2*b^3 + 11*a*b^4 - 3*b^5)*sin
(f*x + e)^4 - (4*a^5 - 16*a^4*b + 24*a^3*b^2 - 24*a^2*b^3 + 9*a*b^4)*sin(f*x + e)^2)/((a^8 - 5*a^7*b + 10*a^6*
b^2 - 10*a^5*b^3 + 5*a^4*b^4 - a^3*b^5)*sin(f*x + e)^6 - 2*(a^8 - 4*a^7*b + 6*a^6*b^2 - 4*a^5*b^3 + a^4*b^4)*s
in(f*x + e)^4 + (a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3)*sin(f*x + e)^2) + 2*(a + 3*b)*log(sin(f*x + e)^2)/a^4)/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 561 vs. \(2 (179) = 358\).
time = 2.00, size = 561, normalized size = 3.10 \begin {gather*} -\frac {{\left (2 \, a^{4} b^{2} - 6 \, a^{3} b^{3} + 13 \, a^{2} b^{4} - 6 \, a b^{5}\right )} \tan \left (f x + e\right )^{6} + 2 \, a^{6} - 6 \, a^{5} b + 6 \, a^{4} b^{2} - 2 \, a^{3} b^{3} + 2 \, {\left (2 \, a^{5} b - 5 \, a^{4} b^{2} + 7 \, a^{3} b^{3} + 2 \, a^{2} b^{4} - 3 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + {\left (2 \, a^{6} - 2 \, a^{5} b - 6 \, a^{4} b^{2} + 18 \, a^{3} b^{3} - 9 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left ({\left (a^{4} b^{2} - 6 \, a^{2} b^{4} + 8 \, a b^{5} - 3 \, b^{6}\right )} \tan \left (f x + e\right )^{6} + 2 \, {\left (a^{5} b - 6 \, a^{3} b^{3} + 8 \, a^{2} b^{4} - 3 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + {\left (a^{6} - 6 \, a^{4} b^{2} + 8 \, a^{3} b^{3} - 3 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2}\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left ({\left (6 \, a^{2} b^{4} - 8 \, a b^{5} + 3 \, b^{6}\right )} \tan \left (f x + e\right )^{6} + 2 \, {\left (6 \, a^{3} b^{3} - 8 \, a^{2} b^{4} + 3 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + {\left (6 \, a^{4} b^{2} - 8 \, a^{3} b^{3} + 3 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2}\right )} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, {\left ({\left (a^{7} b^{2} - 3 \, a^{6} b^{3} + 3 \, a^{5} b^{4} - a^{4} b^{5}\right )} f \tan \left (f x + e\right )^{6} + 2 \, {\left (a^{8} b - 3 \, a^{7} b^{2} + 3 \, a^{6} b^{3} - a^{5} b^{4}\right )} f \tan \left (f x + e\right )^{4} + {\left (a^{9} - 3 \, a^{8} b + 3 \, a^{7} b^{2} - a^{6} b^{3}\right )} f \tan \left (f x + e\right )^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

-1/4*((2*a^4*b^2 - 6*a^3*b^3 + 13*a^2*b^4 - 6*a*b^5)*tan(f*x + e)^6 + 2*a^6 - 6*a^5*b + 6*a^4*b^2 - 2*a^3*b^3
+ 2*(2*a^5*b - 5*a^4*b^2 + 7*a^3*b^3 + 2*a^2*b^4 - 3*a*b^5)*tan(f*x + e)^4 + (2*a^6 - 2*a^5*b - 6*a^4*b^2 + 18
*a^3*b^3 - 9*a^2*b^4)*tan(f*x + e)^2 + 2*((a^4*b^2 - 6*a^2*b^4 + 8*a*b^5 - 3*b^6)*tan(f*x + e)^6 + 2*(a^5*b -
6*a^3*b^3 + 8*a^2*b^4 - 3*a*b^5)*tan(f*x + e)^4 + (a^6 - 6*a^4*b^2 + 8*a^3*b^3 - 3*a^2*b^4)*tan(f*x + e)^2)*lo
g(tan(f*x + e)^2/(tan(f*x + e)^2 + 1)) + 2*((6*a^2*b^4 - 8*a*b^5 + 3*b^6)*tan(f*x + e)^6 + 2*(6*a^3*b^3 - 8*a^
2*b^4 + 3*a*b^5)*tan(f*x + e)^4 + (6*a^4*b^2 - 8*a^3*b^3 + 3*a^2*b^4)*tan(f*x + e)^2)*log((b*tan(f*x + e)^2 +
a)/(tan(f*x + e)^2 + 1)))/((a^7*b^2 - 3*a^6*b^3 + 3*a^5*b^4 - a^4*b^5)*f*tan(f*x + e)^6 + 2*(a^8*b - 3*a^7*b^2
 + 3*a^6*b^3 - a^5*b^4)*f*tan(f*x + e)^4 + (a^9 - 3*a^8*b + 3*a^7*b^2 - a^6*b^3)*f*tan(f*x + e)^2)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**3/(a+b*tan(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 906 vs. \(2 (179) = 358\).
time = 1.38, size = 906, normalized size = 5.01 \begin {gather*} -\frac {\frac {4 \, {\left (6 \, a^{2} b^{2} - 8 \, a b^{3} + 3 \, b^{4}\right )} \log \left (a + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}} - \frac {8 \, \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {2 \, {\left (18 \, a^{4} b^{2} - 24 \, a^{3} b^{3} + 9 \, a^{2} b^{4} + \frac {72 \, a^{4} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {208 \, a^{3} b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {172 \, a^{2} b^{4} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {48 \, a b^{5} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {108 \, a^{4} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {368 \, a^{3} b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {502 \, a^{2} b^{4} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {288 \, a b^{5} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {64 \, b^{6} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {72 \, a^{4} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {208 \, a^{3} b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {172 \, a^{2} b^{4} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {48 \, a b^{5} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {18 \, a^{4} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {24 \, a^{3} b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {9 \, a^{2} b^{4} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}\right )}}{{\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} {\left (a + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}^{2}} + \frac {4 \, {\left (a + 3 \, b\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right )}{a^{4}} - \frac {{\left (a + \frac {4 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {12 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}{a^{4} {\left (\cos \left (f x + e\right ) - 1\right )}} - \frac {\cos \left (f x + e\right ) - 1}{a^{3} {\left (\cos \left (f x + e\right ) + 1\right )}}}{8 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/8*(4*(6*a^2*b^2 - 8*a*b^3 + 3*b^4)*log(a + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos(f*x + e) -
1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)/(a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3) - 8
*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) - 2*(18*a^4*b^2 - 24*a^3
*b^3 + 9*a^2*b^4 + 72*a^4*b^2*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 208*a^3*b^3*(cos(f*x + e) - 1)/(cos(f*x
+ e) + 1) + 172*a^2*b^4*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 48*a*b^5*(cos(f*x + e) - 1)/(cos(f*x + e) + 1)
 + 108*a^4*b^2*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 368*a^3*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)
^2 + 502*a^2*b^4*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 288*a*b^5*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)
^2 + 64*b^6*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 72*a^4*b^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 -
 208*a^3*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 172*a^2*b^4*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3
 - 48*a*b^5*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 18*a^4*b^2*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 -
 24*a^3*b^3*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 9*a^2*b^4*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4)/(
(a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3)*(a + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos(f*x + e) - 1)/
(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)^2) + 4*(a + 3*b)*log(abs(-cos(f*x + e) + 1)/
abs(cos(f*x + e) + 1))/a^4 - (a + 4*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 12*b*(cos(f*x + e) - 1)/(cos(f*x
 + e) + 1))*(cos(f*x + e) + 1)/(a^4*(cos(f*x + e) - 1)) - (cos(f*x + e) - 1)/(a^3*(cos(f*x + e) + 1)))/f

________________________________________________________________________________________

Mupad [B]
time = 13.46, size = 229, normalized size = 1.27 \begin {gather*} \frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,{\left (a-b\right )}^3}-\frac {\frac {1}{2\,a}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (a^2\,b^2-5\,a\,b^3+3\,b^4\right )}{2\,a^3\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (4\,a^2\,b-15\,a\,b^2+9\,b^3\right )}{4\,a^2\,\left (a^2-2\,a\,b+b^2\right )}}{f\,\left (a^2\,{\mathrm {tan}\left (e+f\,x\right )}^2+2\,a\,b\,{\mathrm {tan}\left (e+f\,x\right )}^4+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^6\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a+3\,b\right )}{a^4\,f}-\frac {b^2\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )\,\left (6\,a^2-8\,a\,b+3\,b^2\right )}{2\,a^4\,f\,{\left (a-b\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^3/(a + b*tan(e + f*x)^2)^3,x)

[Out]

log(tan(e + f*x)^2 + 1)/(2*f*(a - b)^3) - (1/(2*a) + (tan(e + f*x)^4*(3*b^4 - 5*a*b^3 + a^2*b^2))/(2*a^3*(a^2
- 2*a*b + b^2)) + (tan(e + f*x)^2*(4*a^2*b - 15*a*b^2 + 9*b^3))/(4*a^2*(a^2 - 2*a*b + b^2)))/(f*(a^2*tan(e + f
*x)^2 + b^2*tan(e + f*x)^6 + 2*a*b*tan(e + f*x)^4)) - (log(tan(e + f*x))*(a + 3*b))/(a^4*f) - (b^2*log(a + b*t
an(e + f*x)^2)*(6*a^2 - 8*a*b + 3*b^2))/(2*a^4*f*(a - b)^3)

________________________________________________________________________________________